package legumes.client.evt.store;

import com.google.gwt.event.shared.GwtEvent;

public class StoreStateChangedEvent extends GwtEvent<StoreStateChangedEventHandler> {

	public static Type<StoreStateChangedEventHandler> TYPE = new Type<StoreStateChangedEventHandler>();
	
	private boolean isStoreOpen;
	
	public StoreStateChangedEvent(boolean isStoreOpen_) {
		isStoreOpen = isStoreOpen_;
	}
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<StoreStateChangedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(StoreStateChangedEventHandler handler) {
		handler.onStoreStateChanged(this);
	}

	public boolean isStoreOpen() {
		return isStoreOpen;
	}


}
